package com.jhy.log4jdemo.controller;

import com.jhy.log4jdemo.annotation.LogAnnotation;
import com.jhy.log4jdemo.pojo.User;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("user")
public class userController {

    @LogAnnotation
    @PostMapping("/add")
    public String addUser(@RequestBody User user) {
        System.out.println("添加的user数据：" + user);
        return "addUser success";
    }

}
